//
//  NSString+HTML.m
//  xinhua_jinyuan
//
//  Created by 党阳阳 on 14-6-23.
//  Copyright (c) 2014年 dangyangyang. All rights reserved.
//

#import "NSString+HTML.h"

@implementation NSString (HTML)

- (NSString *)removeHTMLCode
{
    
    NSString *string = self;
    
    string = [string stringByReplacingOccurrencesOfString:@"&mdash;" withString:@"--"];
    string = [string stringByReplacingOccurrencesOfString:@"&nbsp;" withString:@""];
    string = [string stringByReplacingOccurrencesOfString:@"&rdquo;" withString:@""];
    string = [string stringByReplacingOccurrencesOfString:@"&ldquo;" withString:@""];
    string = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
    
    return string;
}
@end
